LYFX-GOLD-15MIndicator Operation Method:
The indicator provides a buy signal when the price stabilizes above the moving averages. It should be close to the averages at the same time to ensure a close stop loss.
When the conditions are met, a long trade is opened, and the buy signal appears on the indicator. The stop loss is placed with the red line, and the targets are indicated with the blue balloons. Usually, the first target is twice the stop loss, and the second target is three times the stop loss.
This indicator is one of the most powerful indicators for monitoring price explosions in gold.
For clarification, this indicator is used (according to its default settings) exclusively for gold and only on the 15-minute timeframe. The indicator is created by Mr. Layth Al-Muhandis:
The indicator provides a very close stop loss compared to the first and second targets. I recommend adhering strictly to the stop loss and securing the trade after achieving profits.
This is a simple explanation of how the indicator works.
طريقة عمل المؤشر:
يوفر المؤشر إشارة شراء عند استقرار السعر فوق المتوسطات المتحركة. يجب أن يكون السعر قريبًا من المتوسطات في نفس الوقت لضمان وجود استوب لوس قريب.
عند تحقيق الشروط، يتم فتح صفقة شراء، وتظهر إشارة الشراء على المؤشر. يتم وضع الاستوب لوس بالخط الأحمر، وتوضح البالونات الزرقاء الأهداف. عادةً، يكون الهدف الأول ضعف الاستوب لوس، والهدف الثاني ثلاثة أضعاف الاستوب.
هذا المؤشر من بين أقوى المؤشرات لرصد انفجارات الأسعار في الذهب.
للتنويه، يُستخدم هذا المؤشر (وفقًا لإعداداته الافتراضية) حصريًا للذهب وعلى فاصل زمني 15 دقيقة فقط. تم إنشاء المؤشر بواسطة السيد ليث المهندس.
يوفر المؤشر استوب لوس قريب جداً مقارنة بالهدف الأول والهدف الثاني. أنصح بالالتزام الصارم بالاستوب لوس وتأمين الصفقة بعد تحقيق الأرباح.
Cari skrip untuk "stop loss"
Equity Trade Risk ManagerEquity Trade Risk Manager is a simple indicator that helps you protect your portfolio by going into each trade  risk first ! 
Equity Trade Risk Manager does this by calculating your ideal position size or ideal stop loss based on your account size, purchase price and risk tolerance. This ensures you are never risking more than your predetermined amount on each trade. 
Unlike most position size calculators, that will only tell traders how many shares to purchase, Equity Trade Risk Manger allows the trader to choose whether they want to calculate the ideal number of shares to purchase or where to set the trades stop loss based on the number of shares owned. Not only that, but knowing traders need to act fast, the indicator also gives the option to quickly use the current price and low of the day as an entry and stop. Lastly, your stop loss will be plotted onto the chart for a visual aid. 
 Features: 
 Dynamic Risk Settings: 
 
 Account Customization: Input your account size to get metrics tailored to you.
 Calculation Choices: Decide if you want the tool to calculate the number of shares you should buy or where to set your stop-loss.
 Custom Risk Parameters: Use preset risk percentages or set your own to match your comfort level.
 
 Price Point Flexibility: 
 
 Enter your entry and stop price or opt to use the current price and the low of the day.
 
 Interactive Display Settings: 
 
 Customizable Interface: Adjust table positions, text size, and color schemes to match your trading dashboard aesthetic.
 On-Chart Stop-Loss Indication: Visualize your stop loss on the chart itself.
 Get a snapshot of your dollar risk, position size, shares to buy, and stop-loss.
 
ProfitAlgoOverview 
ProfitAlgo is a powerful and intuitive trading tool specifically developed to cater to the requirements of both beginners and experienced traders. It is designed to function in every timeframe and on all cryptocurrencies, stocks, indices, forex, futures, currencies, ETF's, energy and commodities. This innovative tool provides real-time signals, comprehensive trend analysis, and advanced risk management features, making it an indispensable asset for traders of all levels. This cutting-edge tool generates 'BUY' and 'SELL' signals, complemented by an array of robust analytical tools. Empower your trading analysis with this all-in-one solution and add to your arsenal of indicators to make well-informed decisions.
This algorithm incorporates a sophisticated Fourier smoothing technique to effectively filter price data, reduce noise and reveal underlying patterns and trends. By utilizing multiple price series data and incorporating Price Volume Trend, it leverages volume analysis and price movement patterns. Furthermore, the algorithm employs relative and simple moving average calculations to enhance signal clarity and filter out outliers, resulting in a more refined and robust indicator.
 Features 
 
 Buy/Sell signals: Visually illustrated by 'BUY' and 'SELL' labels, these signals provide indications to traders about optimal times to enter or exit positions in the market based on the particular asset they are trading. Traders may want to enter long positions when buy signals appear, and enter short positions when 'SELL' signals appear.
 
 
 Stop Loss/Take Profit Levels: Stop loss and take profit levels are predefined price thresholds that allow traders to automatically exit trades to limit losses or secure profits, respectively. Stop loss and take profit levels are visually depicted through three dotted lines on the trading chart, including the entry price, take profit (TP), and stop loss (SL). Additionally, a table displays the corresponding price entries for all three levels, providing a comprehensive overview of the trade. Traders can effectively manage their risk and optimize their trading by implementing predefined threshold settings and establishing take profit levels, thus safeguarding their profits using a strategic approach.
 
 
 Support and Resistance Levels: Support and resistance levels are key price levels in the market that act as barriers or turning points for the price movement of an asset. Traders utilize these levels to identify potential areas of buying and selling opportunities. These can be depicted as red (resistance) and green (support) horizontal lines. These levels can serve as valuable complements to stop/loss and take profit levels, providing confirmation for profit-taking opportunities and facilitating effective risk management. Moreover, they can synergistically work alongside the price lines to identify potential reversal zones by visualizing market highs/lows in conjunction with areas of supply & demand.
 
 
 Moving Average Bands: Moving average bands, plotted alongside the price data, dynamically change color based on the prevailing trend, with red indicating a downtrend and green representing an uptrend. This visual tool provides valuable insights to users, allowing them to quickly identify and interpret market trends. Integrating Moving Average bands with our buy/sell signals offers added confidence in identifying market trends, enabling traders to seek validation and enhance their decision-making process.
 
 
 Trend Table: The trend table provides real-time information on the current trend of an asset, displaying three distinct outputs: "Uptrend," "Downtrend," and "Ranging Trend." This valuable tool enables users to assess the live trend of an asset, which may differ from the buy/sell signals. The primary objective of this feature is to analyze real-time trends in both ranging and trending market conditions. While the current signal may indicate a 'BUY' signal, the table can present an alternative output, providing valuable insights for traders and investors.
 
 
 Price Lines: Price lines are depicted as two parallel grey lines running alongside the price data, representing the highs and lows of the market. This visual tool is utilized to identify patterns of higher highs and lower lows, enabling traders to gain insights into the overall trend and potential reversals in the market. When used in conjunction with our signals, MA bands and trend table, it may reinforce your interpretation of the underlying trend as well as provide insights into the trend strength.
 
*Note: These features are customizable via the settings menu in TradingView.
 Calculations 
 How are buy/sell signals calculated? 
The buy and sell signals are generated through a comprehensive calculation process that encompasses various types of analysis techniques. With permission from the author, wbburgin's Fourier transform is utilized to filter and extract relevant information from the price data, removing noise from the signals (filter is only applied in this feature). The buy and sell conditions are calculated based on a combination of volume-based analysis, and price movement patterns, employed to assess the direction and strength of market trends. The combination aims to produce a comprehensive view of both volume-based and price-based market dynamics. By integrating these analysis techniques, traders can gain insights into the relationship between volume, price, and market trends. This combined approach, as well as Fourier smoothing, can help identify potential market reversals, confirm trend strength, produce less noisy data and provide additional confirmation signals for trading decisions. By considering the insights provided by this analysis, the algorithm determines the appropriate actions, signaling the opportunities to enter or exit positions in the market. In summary, these calculations aim to identify favorable trading opportunities by considering factors such as trend strength, volume dynamics, and price patterns, ultimately assisting traders in making well-informed decisions in the market.
 How are stop/loss and take/profit levels calculated? 
The stop loss and take profit levels are calculated using a combination of technical factors, including the Average True Range (ATR) and Exponential Moving Average (EMA). The rationale for this combination is to enable dynamic risk management and align profit targets with the prevailing market conditions; ATR provides a measure of volatility and risk, while EMA helps identify the underlying trend, allowing for effective stop-loss and take-profit placement. These indicators are utilized to gauge market volatility and determine suitable levels for managing risk and securing potential profits. By incorporating ATR and EMA calculations, the algorithm generates dynamic stop loss and take profit levels that adapt to market conditions.
 Calculating support and resistance levels 
These levels help identify areas where the price tends to find support (support levels) or encounter resistance (resistance levels). This script utilizes pivot point calculations to determine these significant price levels, which can assist traders in trading decisions regarding potential price reversals, trend continuations, and entry/exit points in their strategies.
 What are the moving average bands based on? 
The moving average bands, based on VWMA (Volume Weighted Moving Average) calculations using OHLC4 price data, are visualized as unique bands on the chart. VWMA bands are chosen to find trends because they effectively combine volume-weighted calculations with moving averages, providing valuable insights into the strength and direction of price movements. These bands dynamically change color to reflect the prevailing trend. In an uptrend, the bands are represented by a green color, while in a downtrend, they appear in red. The VWMA bands utilize a unique counting method to capture trend movements and potential reversals.
 How is the Trend Table calculated? 
The underlying trends in the trend table are calculated based on counting methods applied to the VWMA bands. It utilizes specific thresholds to determine different trends, such as "Up Trend," "Down Trend," and "Ranging Trend." These thresholds are used to assess the current trend of the asset and provide valuable insights for traders.
 Price Lines Calculation 
The price lines are calculated based on the price data. They represent the range of prices, with one line plotted above the closing price and another line plotted below it. The space between these lines is filled to visualize the price volatility. Traders can utilize these lines to identify significant price levels and observe the overall price movement.
 Disclaimer: 
The information provided in my indicators/strategies/systems is not intended as financial advice. I assume no responsibility for any losses or damages, including loss of profits, resulting from the use of or reliance on such information.
All investments carry risks, and past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors bear full responsibility for their investment decisions, which should be based on their own evaluation of financial circumstances, investment objectives, risk tolerance, and liquidity requirements.
Please note that my indicators/strategies/systems are solely for educational purposes! DO NOT request access in the comment's section.
(Simple) Lot Size CalculatorPip Calculator: A Guide for Traders 
The Pip Calculator is a powerful tool designed to help traders calculate their lot size based on their account balance, risk percentage, and stop loss in pips. This guide will walk you through using the Pip Calculator script and explain its features.
 Features of the Pip Calculator: 
 
   User-friendly UI : The Pip Calculator provides a simple and intuitive user interface, making it easy to input your account details and obtain the desired lot size.
   Flexible Inputs : The Pip Calculator allows you to enter your account balance, risk percentage, and stop loss in pips. This flexibility enables you to customize the calculation according to your trading strategy.
   Dynamic Currency Pair Support : The Pip Calculator supports various currency pairs and their respective pip values. The script automatically detects the currency pair of the chart you're viewing, ensuring accurate calculations.
   Real-time Lot Size Display : The Pip Calculator instantly calculates and displays the lot size based on your inputs. The lot size is updated in real-time as you adjust your account balance, risk percentage, or stop loss.
   Visual Representation : The Pip Calculator visually presents the calculated lot size on the chart, making it easy to understand and reference during your trading activities.
 
 Using the Pip Calculator: 
 Install and Apply the Script : To use the Pip Calculator, install it as an extension on your preferred trading platform (such as TradingView). Apply the script to the chart of the desired currency pair.
 Enter Account Details : In the script's user interface, enter your account balance, risk percentage, and stop loss in pips. These details are essential for accurate lot size calculation.
 Review Currency Pair Support : The Pip Calculator automatically detects the currency pair of the chart. Ensure that the currency pair is supported by checking the "Currency pair not supported" message. Currently, GBPJPY is the supported pair.
 Observe Real-time Lot Size : Once you've entered the required information, the script will calculate and display the lot size in real-time. The lot size is adjusted automatically as you modify your inputs.
 Visualize the Lot Size : The calculated lot size is displayed on the chart as a label. You can easily view and reference the lot size while analyzing price movements.
 Customize the UI : The Pip Calculator allows you to customize the appearance of the lot size label. You can adjust the text color, background color, and choose whether to show or hide the lot size label.
Note: The Pip Calculator script is intended as a tool to assist traders in determining an appropriate lot size based on their account balance, risk percentage, and stop loss. It should be used in conjunction with a comprehensive trading strategy and risk management principles.
 Advantages of the Pip Calculator: 
 
  Accuracy: The Pip Calculator incorporates accurate pip values for supported currency pairs, ensuring precise lot size calculations.
  Simplicity: The user-friendly interface and intuitive design make it easy for traders to calculate their lot size without complex calculations or manual estimations.
  Real-time Updates: The Pip Calculator provides instant lot size updates, allowing traders to adapt their position sizing based on changes in account balance, risk percentage, or stop loss.
  Visibility: The visual representation of the lot size on the chart helps traders quickly identify their desired position size and monitor it during trading activities.
 
The Pip Calculator offers a convenient and efficient way to determine lot sizes based on your trading parameters. By using this tool, you can enhance your risk management practices, maintain consistency, and stay aligned with your trading plan.
 Disclaimer: The Pip Calculator script is provided for informational purposes only and should not be considered as financial advice. Trading in the financial markets carries inherent risks, and it is essential to perform your own analysis and consult with a qualified financial advisor before making any investment decisions.
Mechanical Trading StrategyThe "Mechanical Trading Strategy" is a simple and systematic approach to trading that aims to capture short-term price movements in the financial markets. This strategy focuses on executing trades based on specific conditions and predetermined profit targets and stop loss levels.
Key Features:
Profit Target: The strategy allows you to set a profit target as a percentage of the entry price. This target represents the desired level of profit for each trade.
Stop Loss: The strategy incorporates a stop loss level as a percentage of the entry price. This level represents the maximum acceptable loss for each trade, helping to manage risk.
Entry Condition: The strategy triggers trades at a specific time. In this case, the condition for entering a trade is based on the hour of the candle being 16 (4:00 PM). This time-based entry condition provides a systematic approach to executing trades.
Position Sizing: The strategy determines the position size based on a fixed percentage of the available equity. This approach ensures consistent risk management and allows for potential portfolio diversification.
Execution:
When the entry condition is met, signified by the hour being 16, the strategy initiates a long position using the strategy.entry function. It sets the exit conditions using the strategy.exit function, with a limit order for the take profit level and a stop order for the stop loss level.
Take Profit and Stop Loss:
The take profit level is calculated by adding a percentage of the entry price to the entry price itself. This represents the profit target for the trade. Conversely, the stop loss level is calculated by subtracting a percentage of the entry price from the entry price. This level represents the maximum acceptable loss for the trade.
By using this mechanical trading strategy, traders can establish a disciplined and systematic approach to their trading decisions. The predefined profit target and stop loss levels provide clear exit rules, helping to manage risk and potentially maximize returns. However, it is important to note that no trading strategy is guaranteed to be profitable, and careful analysis and monitoring of market conditions are always recommended.
Price Action - Support & Resistance + MACD LONG StrategyUsing "Price Action - Support & Resistance by DGT" and the MACD (Moving Average Convergence Divergence) indicator in TradingView can help develop a trade strategy. Here's a step-by-step approach you can follow:
1. Identifying Support and Resistance Levels: Apply the "Price Action - Support & Resistance by DGT" indicator to your chart. This indicator helps you identify key support and resistance levels based on price action. These levels act as potential areas where the price may reverse or consolidate.
2. Confirming Support and Resistance Levels: Once the indicator has plotted support and resistance levels on your chart, analyze the historical price action around these levels. Look for multiple touches or bounces from the same level, which adds strength to the support or resistance zone.
3. Analyzing the MACD Indicator: Add the MACD indicator to your chart. The MACD consists of two lines: the MACD line and the signal line, along with a histogram representing the difference between the two lines. The MACD helps identify momentum and potential trend reversals.
    When the MACD line crosses above the signal line and the histogram turns positive, it suggests bullish momentum.
4. Identifying Trade Opportunities:
   
   Bullish Trade: Look for a bullish setup when the price approaches a strong support level identified by the "Price Action - Support & Resistance by DGT" indicator. Wait for the MACD lines to cross above the signal line and the histogram to turn positive, indicating bullish momentum. Enter a long position with a stop loss below the 
   support level.
Managing the Trade: Once you enter a trade, consider setting a target based on the distance between your entry point and the nearest significant support or resistance level. You can also use trailing stop losses or other risk management techniques to protect your profits and limit potential losses.
Remember that no trading strategy is guaranteed to be successful, and it's important to practice proper risk management and conduct thorough analysis before making any trading decisions. Additionally, it's recommended to backtest and demo trade this strategy before using it with real money.
PlurexSignalStrategyLibrary   "PlurexSignalStrategy" 
Provides functions that wrap the built in TradingView strategy functions so you can seemlessly integrate with Plurex Signal automation.
NOTE: Be sure to:
- set your strategy default_qty_value to the default entry percentage of your signal
- set your strategy default_qty_type to strategy.percent_of_equity
- set your strategy pyramiding to some value greater than 1 or something appropriate to your strategy in order to have multiple entries.
 long(secret, budgetPercentage, priceLimit, marketOverride) 
  Open a new long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 longAndFixedStopLoss(secret, stop, budgetPercentage, priceLimit, marketOverride) 
  Open a new long entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal stop loss for full open position
  Parameters:
     secret : The secret for your Signal on plurex
     stop : The trigger price for the stop loss. See strategy.exit documentation
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 longAndTrailingStopLoss(secret, trail_offset, trail_price, trail_points, budgetPercentage, priceLimit, marketOverride) 
  Open a new long entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal trailing stop loss for full open position. You must set one of trail_price or trail_points.
  Parameters:
     secret : The secret for your Signal on plurex
     trail_offset : See strategy.exit documentation
     trail_price : See strategy.exit documentation
     trail_points : See strategy.exit documentation
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 short(secret, budgetPercentage, priceLimit, marketOverride) 
  Open a new short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 shortAndFixedStopLoss(secret, stop, budgetPercentage, priceLimit, marketOverride) 
  Open a new short entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal stop loss for full open position
  Parameters:
     secret : The secret for your Signal on plurex
     stop : The trigger price for the stop loss. See strategy.exit documentation
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 shortAndTrailingStopLoss(secret, trail_offset, trail_price, trail_points, budgetPercentage, priceLimit, marketOverride) 
  Open a new short entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal trailing stop loss for full open position. You must set one of trail_price or trail_points.
  Parameters:
     secret : The secret for your Signal on plurex
     trail_offset : See strategy.exit documentation
     trail_price : See strategy.exit documentation
     trail_points : See strategy.exit documentation
     budgetPercentage : Optional, The percentage of budget to use in the entry.
     priceLimit : Optional, The worst price to accept for the entry.
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeAll(secret, marketOverride) 
  Close all positions. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeLongs(secret, marketOverride) 
  close all longs. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeShorts(secret, marketOverride) 
  close all shorts. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeLastLong(secret, marketOverride) 
  Close last long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeLastShort(secret, marketOverride) 
  Close last short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeFirstLong(secret, marketOverride) 
  Close first long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
 closeFirstShort(secret, marketOverride) 
  Close first short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
     secret : The secret for your Signal on plurex
     marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
[MT] Strategy Backtest Template| Initial Release |  | EN | 
An update of my old script, this script is designed so that it can be used as a template for all those traders who want to save time when programming their strategy and backtesting it, having functions already programmed that in normal development would take you more time to program, with this template you can simply add your favorite indicator and thus be able to take advantage of all the functions that this template has.
 🔴Stop Loss and 🟢Take Profit: 
 
 No need to mention that it is a Stop Loss and a Take Profit, within these functions we find the options of: fixed percentage (%), fixed price ($), ATR, especially for Stop Loss we find the Pivot Points, in addition to this, the price range between the entry and the Stop Loss can be converted into a trailing stop loss, instead, especially for the Take Profit we have an option to choose a 1:X ratio that complements very well with the Pivot Points.
 
 📈Heikin Ashi Based Entries: 
 
 Heikin Ashi entries are trades that are calculated based on Heikin Ashi candles but their price is executed to Japanese candles, thus avoiding false results that occur in Heikin candlestick charts, this making in certain cases better results in strategies that are executed with this option compared to Japanese candlesticks.
 
 📊Dashboard: 
 
 A more visual and organized way to see the results and necessary data produced by our strategy, among them we can see the dates between which our operations are made regardless if you have activated some time filter, usual data such as Profit, Win Rate, Profit factor are also displayed in this panel, additionally data such as the total number of operations, how many were gains and how many losses, the average profit and loss for each operation and finally the maximum profits and losses followed, which are data that will be very useful to us when we elaborate our strategies.
 
Feel free to use this template to program your own strategies, if you find errors or want to request a new feature let me know in the comments or through my social networks found in my tradingview profile.
 | Update 1.1 |  | EN | 
 ➕Additions: '
 
  Time sessions filter and days of the week filter added to the time filter section.
  Option to add leverage to the strategy.
  5 Moving Averages, RSI, Stochastic RSI, ADX, and Parabolic Sar have been added as indicators for the strategy.
  You can choose from the 6 available indicators the way to trade, entry alert or entry filter.	
  Added the option of ATR for Take Profit.
  Ticker information and timeframe are now displayed on the dashboard.
  Added display customization and color customization of indicator plots.
  Added customization of display and color plots of trades displayed on chart.
 
 📝Changes: 
 
  Now when activating the time filter it is optional to add a start or end date and time, being able to only add a start date or only an end date.
  Operation plots have been changed from plot() to line creation with line.new().
  Indicator plots can now be controlled from the "plots" section.
  Acceptable and deniable range of profit, winrate and profit factor can now be chosen from the "plots" section to be displayed on the dashboard.
  Aesthetic changes in the section separations within the settings section and within the code itself.
  The function that made the indicators give inputs based on heikin ashi candles has been changed, see the code for more information.
 
 ⚙️Fixes: 
 
  Dashboard label now projects correctly on all timeframes including custom timeframes.
  Removed unnecessary lines and variables to take up less code space.
  All code in general has been optimized to avoid the use of variables, unnecessary lines and avoid unnecessary calculations, freeing up space to declare more variables and be able to use fewer lines of code.
 
 | Lanzamiento Inicial |  | ES | 
Una actualización de mi antiguo script, este script está diseñado para que pueda ser usado como una plantilla para todos aquellos traders que quieran ahorrar tiempo al programar su estrategia y hacer un backtesting de ella, teniendo funciones ya programadas que en el desarrollo normal te tomaría más tiempo programar, con esta plantilla puedes simplemente agregar tu indicador favorito y así poder aprovechar todas las funciones que tiene esta plantilla.
 🔴Stop Loss y 🟢Take Profit: 
 
 No hace falta mencionar que es un Stop Loss y un Take Profit, dentro de estas funciones encontramos las opciones de: porcentaje fijo (%), precio fijo ($), ATR, en especial para Stop Loss encontramos los Pivot Points, adicionalmente a esto, el rango de precio entre la entrada y el Stop Loss se puede convertir en un trailing stop loss, en cambio, especialmente para el Take Profit tenemos una opción para elegir un ratio 1:X que se complementa muy bien con los Pivot Points.
 
 📈Entradas Basadas en Heikin Ashi: 
 
 Las entradas Heikin Ashi son operaciones que son calculados en base a las velas Heikin Ashi pero su precio esta ejecutado a velas japonesas, evitando así́ los falsos resultados que se producen en graficas de velas Heikin, esto haciendo que en ciertos casos se obtengan mejores resultados en las estrategias que son ejecutadas con esta opción en comparación con las velas japonesas.
 
 📊Panel de Control: 
 
 Una manera más visual y organizada de ver los resultados y datos necesarios producidos por nuestra estrategia, entre ellos podemos ver las fechas entre las que se hacen nuestras operaciones independientemente si se tiene activado algún filtro de tiempo, datos usuales como el Profit, Win Rate, Profit factor también son mostrados en este panel, adicionalmente se agregaron datos como el número total de operaciones, cuantos fueron ganancias y cuantos perdidas, el promedio de ganancias y pérdidas por cada operación y por ultimo las máximas ganancias y pérdidas seguidas, que son datos que nos serán muy útiles al elaborar nuestras estrategias.
 
Siéntete libre de usar esta plantilla para programar tus propias estrategias, si encuentras errores o quieres solicitar una nueva función házmelo saber en los comentarios o a través de mis redes sociales que se encuentran en mi perfil de tradingview.
 | Actualización 1.1 |  | ES | 
 ➕Añadidos: 
 
  Filtro de sesiones de tiempo y filtro de días de la semana agregados al apartado de filtro de tiempo.
  Opción para agregar apalancamiento a la estrategia.
  5 Moving Averages, RSI, Stochastic RSI, ADX, y Parabolic Sar se han agregado como indicadores para la estrategia.
  Puedes escoger entre los 6 indicadores disponibles la forma de operar, alerta de entrada o filtro de entrada.	
  Añadido la opción de ATR para Take Profit.
  La información del ticker y la temporalidad ahora se muestran en el dashboard.
  Añadido personalización de visualización y color de los plots de indicadores.
  Añadido personalización de visualización y color de los plots de operaciones mostradas en grafica.
 
 📝Cambios: 
 
  Ahora al activar el filtro de tiempo es opcional añadir una fecha y hora de inicio o fin, pudiendo únicamente agregar una fecha de inicio o solamente una fecha de fin.
  Los plots de operaciones han cambiados de plot() a creación de líneas con line.new().
  Los plots de indicadores ahora se pueden controlar desde el apartado "plots".
  Ahora se puede elegir el rango aceptable y negable de profit, winrate y profit factor desde el apartado "plots" para mostrarse en el dashboard.
  Cambios estéticos en las separaciones de secciones dentro del apartado de configuraciones y dentro del propio código.
  Se ha cambiado la función que hacía que los indicadores dieran entradas en base a velas heikin ashi, mire el código para más información.
 
 ⚙️Arreglos: 
 
  El dashboard label ahora se proyecta correctamente en todas las temporalidades incluyendo las temporalidades personalizadas.
  Se han eliminado líneas y variables innecesarias para ocupar menos espacio en el código.
  Se ha optimizado todo el código en general para evitar el uso de variables, líneas innecesarias y evitar los cálculos innecesarios, liberando espacio para declarar más variables y poder utilizar menos líneas de código.
Joker Trailing TP BotTrailing Take Profit is used by the traders to increase their gains when the prices moves in a favorable direction. Let’s have a look at what is Trailing Take Profit and how it works.
What Is a Trailing Take Profit?
Trailing Take Profit is a term largely used in crypto, whereas you may encounter the term Trailing Stop in traditional trading describing almost the same thing, So what’s the difference between Trailing Take Profit and Trailing Stop? Trailing Stop is a type of Stop Loss automatically moving in the same direction as the asset’s price. Trailing Take Profit is nothing else than Trailing Stop activated after initial Take Profit is reached.
The main difference between these two is that Trailing Take Profit takes the profit in any case (altough it might be later annihilated by Trailing Stop). Thus, Trailing Take Profit reduces the risks that might’ve occurred using Trailing Stop alone.   Trailing Take Profit is bound to the maximum of Take Profit price instead of just a price increase/decrease.
As you might notice, the terms Trailing Take Profit and Stop Loss are quite similar. To avoid confusion, in this article we will be talking about Trailing Take Profit as defined above.
Trailing Take Profit only moves in one direction. It is designed to lock in profit and limit losses. The trailing profit only moves up (in case of a long strategy) once the price has surpassed previous high and a new high has been established. If the trailing take profit moves up, it cannot move back down, thus securing the profit and preventing losses.
Trailing Take Profit allows the trade to remain open and continue to profit as long as the price is moving in the investor’s favor.  If the price changes direction and the change surpasses the previously set percentage the order will be closed.
How Does it Work?
For example if you buy BTC at the price of 10000, if you set a Take Profit at 11000 and a Trailing Take Profit at 5% :
If the price goes up to 10500, nothing happens because the Take Profit at 11000 has not been reached.
Then if the BTC price goes up top 11000, a Stop Order at 10450 will be set.
Then if the BTC price goes down to 10500, the Stop Order stays at 104500. 
Then if the BTC price goes up to 12000, the Stop Order moves to 11400. 
Then if the BTC price goes down to 11000, the Stop Order at 11400 is executed.
You see that without Trailing Take Profit, the buy order would have been sold at 11000. Thus, a trader would miss an earning opportunity at 11400. 
Cipher B divergencies for Crypto (Finandy support)Hello Traders!
In times of high volatility, it is important to follow a market-neutral strategy to protect your hard-earned assets. The simple script employs common buy/sell and/or divergencies signals from the VuManChu Cipher B indicator with fixed stop losses and takes profits. The signals are filtered by a local trend of a coin of interest and the global trend of Bitcoin. These trends-filtered signals demonstrated better performance on most of the back- and forward- tests for USDT cryptocurrency futures. The strategy is based on my real experience, it's a diamond I want to share with you.
In terms of visualization if the background is red and the price is below the yellow line then only a short position can be opened. Conversely, if the price is above the yellow line AND the background is green only a long position can be opened.
Inputs from VuManChu you can find on the top. Frankly, I do not know how they can help you to improve the performance of the strategy. My inputs of the script you can find in "Trend Settings" and "TP/SL Settings" at the bottom.
The checkbox "Only divergencies" lets to broadcast only more reliable buy/sell signals for a cost of rare deals.
The checkbox "Cancel all positions if price crosses local sma?" makes additional trailing stop loss. Usually, this function increases the win rate by "smoothing" the risk/reward ratio, as a usual stop loss does.
You can tune SL/TP based on backtesting.
To connect the script to Finandy just edit "name" and "secret" to connect your webhook (see the bottom of the script).
The rule of thumb for the strategy is "only divergencies" - ON, high reward/risk (TP/SL) ratio, 5 min timeframe on chart help with performance.
Finally, I am looking forward to feedback from you. If you have some cool features for my script in your mind, do not hesitate to leave them in the comments.
Good luck!
Ultimate Strategy Shell [ArtK]This strategy shell script accepts entry/exit signals from an external study indicator. 
It is built to cover most common trade execution strategies such as, multiple take profit levels, break even, trailing stop loss, position reverse, laddering and more.
It also aims to provide extended trade statistics such as the actual (win/loss) figures for trades instead of figures for orders as TradingView provides in the Strategy Test Overview.
Features	
	- 3 Take Profit levels.
	- 3 Take Profit target type options (Percentage, Risk Reward Ratio or (IN DEVELOP) Strategy).
	- 2 Stop Loss type options (Percentage, Strategy).	
	- Break Even stoop loss (will move the Stop Loss to the entry price after the 1st or 2nd Take Profit). 
	- Trailing Stop Loss (will move the Stop Loss after the last Take Profit at specified deviation on every candle).	
	- Trades Summary Label
		Shows the number of wins and losses in a row.
		Shows the actual (win/loss) figures for trades instead of figures for orders as TradingView provides in the Strategy Test Overview.
		Shows the period from the first trade until the last trade.
		Shows how many times each Take Profit level was reached (IN DEVELOP).
		(IN DEVELOP) Shows the maximum Stop Loss when using the Stop Loss – Strategy option (helpful when estimating Stop Losses when leveraging).
		Plots marks at the bottom of the chart to indicate winning or losing trades (helps to quickly find losing trades for example).
	- Entry Filters
		-- Date Time, allows placing trades only during the specified period. 
		-- ADX, filters trades below specified ADX value.
		-- Max Stop Loss, can be enabled when the Stop Loss type is set to "Strategy". Used to prevent taking trades which exceed liquidation price.
		-- Direction, will filter trades in a certain direction.
Instruction
		- The strategy script relies on an external indicator therefore it is required to add the signal indicator first.
		- To adapt the signal indicator to be compatible it must have only one plot.
			-- The default value of the plot should be 1 when there is no buy/sell signal.
			-- When the signal indicator signals BUY the line should plot the value  
			-- When the signal indicator signals SELL the line should plot the value  
			-- (I am aiming to support EXIT signals as well as the Stop Loss and Take Profit percentages in the near future)
		- The first time you load the script it will show an error "Study Error: Signal source set to default ". This means the signal indicator was not selected. 
		   The signal indicator should be selected  in the strategy configuration panel option "Signal Source"
[DisDev] 12 Candle|Round#|Future SessionsThis indicator has many components; below, each component is explained and how it can be used as a trading tool.
 1) Future Lines 
a. Vertical lines are projected into the future to mark the beginning of each of the three major markets, Tokyo, London, and New York. 
b. When major markets open, this can cause an increase in price action. So this component provides the trader with a reminder of when the next major market opens. 
c. Also, the days of the week are displayed to allow the user to backtest price reaction for certain days of the week easily (e.g., Major Markets reopening after the weekend). 
   
 2) 12 Hour Candle Sessions High and Low 
a. As price intersects with the beginning of the session, the vertical line disappears, and two corresponding horizontal lines begin. These horizontal lines dynamically adjust to mark each session's high and low, and a semi-transparent box fills the space between the high and low lines.
b. The duration of each session is a three-hour window, which each consists of 12 Fifteen-Minute Candles. This marks the hour prior to equity markets open, the opening hour, and the post-open hour.
c. The sessions highs and lows can be selected within the settings show for a 24 hour period. This assists the trader with session range breakouts; three examples of how this could be traded are below. 
Example 1
d. The Tokyo and London session high kept the price action within a range. Once it broke the range, the Tokyo and London session highs were used as support, resulting in a range breakout. 
  
Example 2
e. The below picture shows price action failing to break London Session Low and New York Session High; this is followed by Tokyo Low acting as resistance and price moving down 9%.
  
Example 3
f. Below price action with an increased volume of 323% (based on the average of the last 10 bar) fails to break the Tokyo High on the 1st attempt. The second attempt fails on 241% volume. The third attempt at 475% breaks the range, completing the range breakout seeing a move of 3.4% in price. 
   
 4) High of Day (HOD) and Low of Day (LOD) 
a. As the trading day unfolds, we mark the HOD (d-High) and LOD (d-Low) with blue dotted horizontal lines. Then at the start of the next trading day, the former High and Low become the Previous Day High (pd-High) and Low (pd-Low) and are changed to dashes.
b. These high and low levels add extra confluence with the session high and lows for Swing Failure Patterns (SFP) and confirmation of trends. 
   
 5) Round Numbers 
a. As humans, it's hard to use just any number to make sense of things. We prefer to use round numbers. This is important for trading as many traders will automatically use round numbers as their stop losses.
b. This indicator component reminds users of this fact and displays round numbers such as 00, 25, 50, and 75. The indicator automatically calculates and displays lines for the round numbers for as many as twelve levels above and below the current price.
c. Below are examples of how round numbers are broken to trigger stop losses; you may want to break the habit of using round numbers as your stop losses. 
   
   
 Below is the indicator in full swing, displaying all the elements described above. 
   
Day Trading SPYThis script can be used to see a potential trend change, ride a trend and to scalp following the current trend.
Indicators:
-	ATR (bright green/maroon) – is a longer term trend ATR line
-	MA (green/red) - is a shorter term MA, where the fast MA is dotted and the long MA is a line
-	Support and Resistance (white bold line) – long-term support and resistance areas
-	Scalping signals (red/green) – small triangles above/below the candles bouncing off fast MA
-	Black candles - oversized huge candles, which must be addressed carefully, especially when these candles change the trend per ATR, as with such huge candle – it is hard to determine where to place the stop-loss (if it is above/below the candle, since the candle is so big - it becomes a big risk). Also such candles may point to an unusual market moves. The size can be adjusted from 0.1 and up, it’s set to 1.4 by default, but it can be changed as needed. With such candles, it is best to wait and see what market does. If the black candle is following the ATR trend or changing the trend per ATR – wait for next 1-3 candles or so, usually those re-bounce in the opposite direction of the ATR trend, which allows you to open the position with a tighter stop-loss.
-	Olive and Maroon candles – overbought and oversold candles per RSI (80/15 default) levels. At this levels just watch out for a potential soon reversal. Keep in mind, price may continue going oversold/overbought for a while, so look for additional confirmations.
1)	ATR (long-term trend): The flag “Buy” and “Sell” signals (can set Alerts), which happens when the price is crossing through ATR line, marking a potential trend change. If ATR matches MA and ideally there is a breakout - open position in the direction of the signal and use the ATR line as your initial hard stop-loss until you reach the first price target / take first profit. It is best to use the most recent high/low pivot or a Fibonacci extension for the first price target. Once you take it – move SL to entry to secure the profits. If the trend continues and you take the next price target, you can use the fastMA (dotted line) as your dynamic stop-loss to ride the trend. Use the bold white line (long-term support and resistance) where price may certainly reverse where you can close your position completely if you day-trading Options.
2)	MA (scalping): The small green and red triangles below/above the bars (can set Alerts), which appear when the price “touches” the fast MA (dotted line) and re-bounces from it with the candle matching the direction (bullish/bearish). Make sure ATR and MA are both going in the same direction for best results. This can be used to scalp for small profits or to jump into the trend. To minimize the risk, since you are jumping into the trend, I suggest placing your stop-loss slightly above/below the candle (the one which bounced off the fast MA). Price targets are similar – most recent high/low pivot or a Fibonacci extension. Same way, once you take the first profit/reach the first price target, move SL to entry and on the next price target – use the fast MA as your dynamic stop-loss.
If you don’t know how to divide up your position - here is an example on how I take profits between the price targets:
-	Open position with buying a multiple of x4 contracts
-	Sell ½ of the position at first price target and move my SL to entry
-	Sell ½ of the remaining position at a second price target
-	Sell the rest of the position at the third price target or sell ½ of it and use the fast MA as my dynamic stop-loss for the remaining of the position
Also, keep an eye on the breakouts, especially if they go along the ATR and MA trend and keep an eye on the volume, which may help confirming the direction of the price.
MACD + CMF + EMA + Supertrend by TradeSmartHello everyone and welcome to our first script release!
This script is one of many upcoming scripts. This one is a test for us, how it works, how you guys like this kind of stuff, and for feedback what we should change/improve at.
SCRIPT IS OPTIMIZED FOR:
EUR/USD 30 MINUTE TIMEFRAME
Video of the Strategy:
Search for “MACD + CMF + 200 EMA + Supertrend Trading Strategy Tested 100 Times with Great Results!” on our channel.
In this video you can find the exact strategy we programmed, just one added feature: Supertrend trailing stop loss. (position gets closed once the price hits the Supertrend indicator)
Now you can modify the following:
MACD settings
Supertrend settings
EMA settings
CMF settings
We will update the script with more and more features.
The first update will be:
Modifiable risk to reward ratio.
I will make a video of how to use this indicator next week, explaining all the features and more!
Hope you like it! Don't forget to let us know what we should change or improve. Thanks, and have a great day!
STRATEGY ENTRY RULES
LONG 	
When CMF is above 0 and price is under EMA. Also MACD has made a double cross above the zero line (meaning one cross down and one cross up by the MACD line). Then go long!
Note: 
MACD or Signal must return under 0 in order to start a new position
If either of the MACD lines touches the 0 line before entry, we skip the trade and wait for the next signal.
SHORT	
When CMF is under 0 and price is under EMA. Also MACD has made a double cross under the zero line (meaning one cross up and one cross down by the MACD line). Then go short!
Note: 
MACD or Signal must return under 0 in order to start a new position.
If either of the MACD lines touches the 0 line before entry, we skip the trade and wait for the next signal.
TAKE PROFIT	
When price hits the exit price (calculated from stop loss with the risk ratio), then exit with 50% of the position. The other 50% will stay open until the price hits the  supertrend or the base stop loss.
STOP LOSS	
When price hits stop loss then exit the position. Stop loss is calculated from the Supertrend and it is a trailing one, meaning it changes based on the movement of the price.
QUANTITY TO BUY	
The quantity to buy is based on the Risk Per Trade % attribute. This means that we can set how much money we want to risk on one trade. Meaning that if we lose that particular position, then a Risk Per Trade % value of our equity will be lost.
Example: if you set the Risk Per Trade % to 1 % and you have a 100$ account balance, then if you loose the trade you will loose 1$ max.
Multi-Market Swing Trader Webhook Ready [HullBuster] 
  
 Introduction 
This is an all symbol swing trading strategy intended for webhook integration to live accounts. This script employs an adjustable bandwidth ping pong algorithm which can be run in long only, short only or bidirectional modes. Additionally, this script provides advanced features such as pyramiding and DCA. It has been in development for nearly three years and exposes over 90 inputs to accommodate varying risk reward ratios. Equipped with a proper configuration it is suitable for professional traders seeking quality trades from a cloud based platform. This is my most advanced Pine Script to date which combines my RangeV3 and TrendV2 scripts. Using this combination it tries to bridge the gap between range bound and trending markets. I have put a lot of time into creating a system that could transition by itself so as to require less human intervention and thus be able to withstand long periods in full automation mode.
As a Pine strategy, hypothetical performance can be easily back-tested. Allowing you to Iron out the configuration of your target instrument. Now with recent advancements from the Pine development team this same script can be connected to a webhook through the alert mechanism. The requirement of a separate study script has been completely removed. This really makes things a lot easier to get your trading system up and running. I would like to also mention that TradingView has made significant advancements to the back-end over the last year. Notably, compile times are much faster now permitting more complex algorithms to be implemented. Thank you TradingView!
I used QuantConnect as my role model and strived to produce a base script which could compete with higher end cloud based platforms while being attractive to similarly experienced traders. The versatility of the Pine Language combined with the greater selection of end point execution systems provides a powerful alternative to other cloud based platforms.  At the very least, with the features available today, a modular trading system for everyday use is a reality. I hope you'll agree.
This is a swing trading strategy so the behavior of this script is to buy on weakness and sell on strength. In trading parlance this is referred to as Support and Resistance Trading. Support being the point at which prices stop falling and start rising. Resistance being the point at which prices stop rising and fall. The chart real estate between these two points being defined as the range. This script seeks to implement strategies to profit from placing trades within this region. Short positions at resistance and long positions at support. Just to be clear, the range as well as trends are merely illusions as the chart only receives prices. However, this script attempts to calculate pivot points from the price stream. Rising pivots are shorts and falling pivots are longs. I refer to pivots as a vertex in this script which adds structural components to the chart formation (point, sides and a base). When trading in “Ping Pong” mode long and short positions are interleaved continuously as long as there exists a detectable vertex.
This is a non-hedging script so those of us subject to NFA FIFO Rule 2-43(b) should be generally safe to webhook into signals emitted from this script. However, as covered later in this document, there are some technical limitations to this statement. I have tested this script on various instruments for over two years and have configurations for forex, crypto and stocks. This script along with my TrendV2 script are my daily trading vehicles as a webhook into my forex and crypto accounts. This script employs various high risk features that could wipe out your account if not used judiciously. You should absolutely not use this script if you are a beginner or looking for a get-rich-quick strategy. Also please see my CFTC RULE 4.41 disclosure statement at the end of the document. Really!
Does this script repaint? The short answer is yes, it does, despite my best efforts to the contrary. EMAs are central to my strategy and TradingView calculates from the beginning of the series so there is just no getting around this. However, Pine is improving everyday and I am hopeful that this issue will be address from an architectural level at some point in the future. I have programmed my webhook to compensate for this occurrence so, in the mean time, this my recommended way to handle it (at the endpoint and before the broker).
 Design 
This strategy uses a ping pong algorithm of my own design. Basically, trades bounce off each other along the price stream. Trades are produced as a series of reversals. The point at which a trade reverses is a pivot calculation. A measurement is made between the recent valley to peak which results in a standard deviation value. This value is an input to implied probability calculation.Yes, the same implied probability used in sports betting. Odds are then calculated to determine the likelihood of price action continuing or retracing to the pivot. Based on where the account is at alert time, the action could be an entry, take profit or pyramid signal. In this design, trades must occur in alternating sequence. A long followed by a short then another long followed by a short and so on. In range bound price action trades appear along the outer bands of the channel in the aforementioned sequence.  Shorts on the top and longs at the bottom. Generally speaking, the widths of the trading bands can be adjusted using the vertex dynamics in Section 2. There are a dozen inputs in this section used to describe the trading range. It is not a simple adjustment. If pyramids are enabled the strategy overrides the ping pong reversal pattern and begins an accumulation sequence. In this case you will see a series of same direction trades.
This script uses twelve indicators on a single time frame. The original trading algorithms are a port from a C++ program on proprietary trading platform. I’ve converted some of the statistical functions to use standard indicators available on TradingView. The setups make heavy use of the Hull Moving Average in conjunction with EMAs that form the Bill Williams Alligator as described in his book “New Trading Dimensions” Chapter 3. Lag between the Hull and the EMAs play a key role in identifying the pivot points. I really like the Hull Moving Average. I use it in all my systems, including 3 other platforms. It’s is an excellent leading indicator and a relatively light calculation.
The trend detection algorithms rely on several factors:
1. Smoothed EMAs in a Willams Alligator pattern.
2. Number of pivots encountered in a particular direction.
3. Which side debt is being incurred.
4. Settings in Section 4 and 5 (long and short)
The strategy uses these factors to determine the probability of prices continuing in the most recent direction. My TrendV2 script uses a higher time frame to determine trend direction. I can’t use that method in this script without exceeding various TradingView limitations on code size. However, the higher time frame is the best way to know which trend is worth pursuing or better to bet against.
The entire script is around 2400 lines of Pine code which pushes the limits of what can be created on this platform given the TradingView maximums for: local scopes, run-time duration and compile time. The module has been through numerous refactoring passes and makes extensive use of ternary statements. As such, It takes a full minute to compile after adding it to a chart. Please wait for the hovering dots to disappear before attempting to bring up the input dialog box. Scrolling the chart quickly may bring up an hour glass.
Regardless of the market conditions: range or trend. The behavior of the script is governed entirely by the 91 inputs. Depending on the settings, bar interval and symbol, you can configure a system to trade in small ranges producing a thousand or more trades. If you prefer wider ranges with fewer trades then the vertex detection settings in Section 2 should employ stiffer values. To make the script more of a trend follower, adjustments are available in Section 4 and 5 (long and short respectively). Overall this script is a range trader and the setups want to get in that way. It cannot be made into a full blown trend trading system. My TrendV2 is equipped for that purpose. Conversely, this script cannot be effectively deployed as a scalper either. The vertex calculation require too much data for high frequency trading. That doesn’t work well for retail customers anyway. The script is designed to function in bar intervals between 5 minutes and 4 hours. However, larger intervals require more backtest data in order to create reliable configurations. TradingView paid plans (Pro) only provide 10K bars which may not be sufficient. Please keep that in mind.
The transition from swing trader to trend follower typically happens after a stop is hit. That means that your account experiences a loss first and usually with a pyramid stack so the loss could be significant. Even then the script continues to alternate trades long and short. The difference is that the strategy tries to be more long on rising prices and more short on falling prices as opposed to simply counter trend trading. Otherwise, a continuous period of rising prices results in a distinctly short pyramid stack. This is much different than my TrendV2 script which stays long on peaks and short on valleys. Basically, the plan is to be profitable in range bound markets and just lose less when a trend comes along. How well this actually plays out will depend largely on the choices made in the sectioned input parameters.
 Sections 
The input dialog for this script contains 91 inputs separated into six sections.
Section 1: Global settings for the strategy including calculation model, trading direction, exit levels, pyramid and DCA settings. This is where you specify your minimum profit and stop levels. You should setup your Properties tab inputs before working on any of the sections. It’s really important to get the Base Currency right before doing any work on the strategy inputs. It is important to understand that the “Minimum Profit” and “Limit Offset” are conditional exits. To exit at a profit, the specified value must be exceeded during positive price pressure. On the other hand, the “Stop Offset” is a hard limit.
Section 2: Vertex dynamics. The script is equipped with four types of pivot point indicators. Histogram, candle, fractal and transform. Despite how the chart visuals may seem. The chart only receives prices. It’s up to the strategy to interpret patterns from the number stream. The quality of the feed and the symbol’s bar characteristics vary greatly from instrument to instrument. Each indicator uses a fundamentally different pattern recognition algorithm. Use trial and error to determine the best fit for your configuration. After selecting an indicator type, there are eight analog fields that must be configured for that particular indicator. This is the hardest part of the configuration process. The values applied to these fields determine how the range will be measured. They have a big effect on the number of trades your system will generate. To see the vertices click on the “Show Markers” check box in this section. Red markers are long positions and blue markers are short. This will give you an idea of where trades will be placed in natural order.
Section 3: Event thresholds. Price spikes are used to enter and exit trades. The magnitude which define these spikes are configured here. The rise and fall events are primarily for pyramid placement. The rise and fall limits determine the exit threshold for the conditional “Limit Offset” field found in Section 1. These fields should be adjusted one at a time. Use a zero value to disengage every one but the one you are working on. Use the fill colors found in Section 6 to get a visual on the values applied to these fields. To make it harder for pyramids to enter stiffen the Event values. This is more of a hack as the formal pyramid parameters are in Section 1.
Section 4 and 5: Long and short settings. These are mirror opposite settings with all opposing fields having the same meaning. Its really easy to introduce data mining bias into your configuration through these fields. You must combat against this tendency by trying to keep your settings as uniform as possible. Wildly different parameters for long and short means you have probably fitted the chart. There are nine analog and thirteen Boolean fields per trade direction. This section is all about how the trades themselves will be placed along the range defined in Section 2. Generally speaking, more restrictive settings will result in less trades but higher quality. Remember that this strategy will enter long on falling prices and short on rising prices. So getting in the trade too early leads to a draw-down. However, this could be what you want if pyramiding is enabled. I, personally, have found that the best configurations come from slightly skewing one side. I just accept that the other side will be sub-par.
Section 6: Chart rendering. This section contains one analog and four Boolean fields. More or less a diagnostic tool. Of particular interest is the “Symbol Debt Sequence” field. This field contains a whole number which paints regions that have sustained a run of bad trades equal or greater than specified value. It is useful when DCA is enabled. In this script Dollar Cost Averaging on new positions continues only until the symbol debt is recouped. To get a better understanding on how this works put a number in this field and activate DCA. You should notice how the trade size increases in the colored regions. The “Summary Report” checkbox displays a blue information box at the live end of the chart. It exposes several metrics which you may find useful if manually trading this strategy from audible alerts or text messages.
 Pyramids 
This script features a downward pyramiding strategy which increases your position size on losing trades. On purely margin trades, this feature can be used to, hypothetically, increase the profit factor of positions (not individual trades). On long only markets, such as crypto, you can use this feature to accumulate coins at depressed prices. The way it works is the stop offset, applied in the Section 1 inputs, determines the maximum risk you intend to bear.  Additional trades will be placed at pivot points calculated all the way down to the stop price. The size of each add on trade is increased by a multiple of its interval. The maximum number of intervals is limited by the “Pyramiding” field in the properties tab. The rate at which pyramid positions are created can be adjusted in Section 1. To see the pyramids click on the “Mark Pyramid Levels” check box in the same section. Blue triangles are painted below trades other than the primary.
Unlike traditional Martingale strategies, the result of your trade is not dependent on the profit or loss from the last trade. The position must recover the R1 point in order to close. Alternatively, you can set a “Pyramid Bale Out Offset” in Section 1 which will terminate the trade early. However, the bale out must coincide with a pivot point and result in a profitable exit in order to actually close the trade. Should the market price exceed the stop offset set in Section 1, the full value of the position, multiplied by the accepted leverage, will be realized as a loss to the trading account. A series of such losses will certainly wipe out your account.
Pyramiding is an advanced feature intended for professional traders with well funded accounts and an appropriate mindset. The availability of this feature is not intended to endorse or promote my use of it. Use at your own risk (peril).
 DCA 
In addition to pyramiding this script employs DCA which enables users to experiment with loss recovery techniques. This is another advanced feature which can increase the order size on new trades in response to stopped out or winning streak trades. The script keeps track of debt incurred from losing trades. When the debt is recovered the order size returns to the base amount specified in the properties tab. The inputs for this feature are found in section 3 and include a limiter to prevent your account from depleting capital during runaway markets. The main difference between DCA and pyramids is that this implementation of DCA applies to new trades while pyramids affect open positions. DCA is a popular feature in crypto trading but can leave you with large “bags” if your not careful. In other markets, especially margin trading, you’ll need a well funded account and much experience.
To be sure pyramiding and dollar cost averaging is as close to gambling as you can get in respectable trading exchanges. However, if you are looking to compete in a spot trading contest or just want to add excitement to your trading life style those features could find a place in your strategies. Although your backtest may show spectacular gains don’t expect your live trading account to do the same. Every backtest has some measure of data mining bias. Please remember that.
 Webhook Integration 
The TradingView alerts dialog provides a way to connect your script to an external system which could actually execute your trade. This is a fantastic feature that enables you to separate the data feed and technical analysis from the execution and reporting systems. Using this feature it is possible to create a fully automated trading system entirely on the cloud. Of course, there is some work to get it all going in a reliable fashion. To that end this script has several things going for it.  First off, it is a strategy type script. That means that the strategy place holders such as {{strategy.position_size}} can be embedded in the alert message text. There are more than 10 variables which can write internal script values into the message for delivery to the specified endpoint.  Additionally, my scripts output the current win streak and debt loss counts in the {{strategy.order.alert_message}} field. Depending on the condition, this script will output other useful values in the JSON “comment” field of the alert message. Here is an excerpt of the fields I use in my webhook signal:
"broker_id": "kraken",
"account_id": "XXX XXXX XXXX XXXX",
"symbol_id": "XMRUSD",
"action": "{{strategy.order.action}}",
"strategy": "{{strategy.order.id}}",
"lots": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"comment": "{{strategy.order.alert_message}}",
"timestamp": "{{time}}"
Though TradingView does a great job in dispatching your alert this feature does come with a few idiosyncrasies. Namely, a single transaction call in your script may cause multiple transmissions to the endpoint. If you are using placeholders each message describes part of the transaction sequence. A good example is closing a pyramid stack. Although the script makes a single strategy.close() call, the endpoint actually receives a close message for each pyramid trade. The broker, on the other hand, only requires a single close. The incongruity of this situation is exacerbated by the possibility of messages being received out of sequence. Depending on the type of order designated in the message, a close or a reversal. This could have a disastrous effect on your live account. This broker simulator has no idea what is actually going on at your real account. Its just doing the job of running the simulation and sending out the computed results. If your TradingView simulation falls out of alignment with the actual trading account lots of really bad things could happen. Like your script thinks your are currently long but the account is actually short. Reversals from this point forward will always be wrong with no one the wiser. Human intervention will be required to restore congruence. But how does anyone find out this is occurring? In closed systems engineering this is known as entropy. In practice your webhook logic should be robust enough to detect these conditions. Be generous with the placeholder usage and give the webhook code plenty of information to compare states. Both issuer and receiver. Don’t blindly commit incoming signals without verifying system integrity.
 Operation 
This is a swing trading strategy so the fundamental behavior of this script is to buy on weakness and sell on strength. As such trade orders are placed in a counter direction to price pressure. What you will see on the chart is a short position on peaks and a long position on valleys. This is slightly misleading since a range as well as a trend are best recognized, in hindsight, after the patterns occur on the chart. In the middle of a trade, one never knows how deep valleys will drop or how high peaks will rise. For certain, long trades will continue to trigger as the market prices fall and short trades on rising prices. This means that the maximum efficiency of this strategy is achieved in choppy markets where the price doesn’t extend very far from its adjacent pivot point. Conversely, this strategy will be the least efficient when market conditions exhibit long continuous single direction price pressure. Especially, when measured in weeks. Translation, the trend is not your friend with this strategy. Internally, the script attempts to recognize prolonged price pressure and changes tactics accordingly. However, at best, the goal is to weather the trend until the range bound market returns. At worst, trend detection fails and pyramid trades continue to be placed until the limit specified in the Properties tab is reached. In all likelihood this could trigger a margin call and if it hits the stop it could wipe out your account.
This script has been in beta test four times since inception. During all that time no one has been successful in creating a configuration from scratch. Most people give up after an hour or so. To be perfectly honest, the configuration process is a bear. I know that but there is no way, currently, to create libraries in Pine. There is also no way specify input parameters other than the flattened out 2-D inputs dialog. And the publish rules clearly state that script variations addressing markets or symbols (suites) are not permitted. I suppose the problem is systemic to be-all-end-all solutions like my script is trying to be. I needed a cloud strategy for all the symbols that I trade and since Pine does not support library modules, include files or inter process communication this script and its unruly inputs are my weapon of choice in the war against the market forces. It takes me about six hours to configure a new symbol. Also not all the symbols I configure are equally successful. I should mention that I have a facsimile of this strategy written in another platform which allows me to run a backtest on 10 years of historical data. The results provide me a sanity check on the inputs I select on this platform.
My personal configurations use a 10 minute bar interval on forex instruments and 15 minutes on crypto. I try to align my TradingView scripts to employ standard intervals available from the broker so that I can backtest longer durations than those available on TradingView. For example, Bitcoin at 15 minute bars is downloadable from several sources. I really like the 10 minute bar. It provides lots of detectable patterns and is easy to store many years in an SQL database.
The following steps provide a very brief set of instructions that will get you started but will most certainly not produce the best backtest. A trading system that you are willing to risk your hard earned capital will require a well crafted configuration that involves time, expertise and clearly defined goals. As previously mentioned, I have several example configurations that I use for my own trading that I can share with you if you like. To get hands on experience in setting up your own symbol from scratch please follow the steps below.
Step 1. Setup the Base currency and order size in the properties tab.
Step 2. Select the calculation presets in the Instrument Type field.
Step 3. Select “No Trade” in the Trading Mode field
Step 4. Select the Histogram indicator from Section 2. You will be experimenting with different ones so it doesn’t matter which one you try first.
Step 5. Turn on Show Markers in Section 2.
Step 6. Go to the chart and checkout where the markers show up. Blue is up and red is down. Long trades show up along the red markers and short trades on the blue.
Step 7. Make adjustments to “Base To Vertex” and “Vertex To Base” net change and ROC in Section 2. Use these fields to move the markers to where you want trades to be.
Step 8. Try a different indicator from Section 2 and repeat Step 7 until you find the best match for this instrument on this interval. This step is complete when the Vertex settings and indicator combination produce the most favorable results.
Step 9. Go to Section 4 and enable “Apply Red Base To Base Margin”.
Step 10. Go to Section 5 and enable “Apply Blue Base To Base Margin”.
Step 11. Go to Section 2 and adjust “Minimum Base To Base Blue” and “Minimum Base To Base Red”. Observe the chart and note where the markers move relative to each other. Markers further apart will produce less trades but will reduce cutoffs in “Ping Pong” mode.
Step 12. Turn off Show Markers in Section 2.
Step 13. Put in your Minimum Profit and Stop Loss in the first section. This is in pips or currency basis points (chart right side scale). Percentage is not currently supported. Note that the profit is taken as a conditional exit on a market order not a fixed limit. The actual profit taken will almost always be greater than the amount specified. The stop loss, on the other hand, is indeed a hard number which is executed by the TradingView broker simulator when the threshold is breached.
Step 14. Return to step 3 and select a Trading Mode (Long, Short, BiDir, Ping Pong). If you are planning to trade bidirectionally its best to configure long first then short. Combine them with “BiDir” or “Ping Pong” after setting up both sides of the trade individually. The difference between “BiDir” and “Ping Pong” is that “Ping Pong” uses position reversal and can cut off opposing trades less than the specified minimum profit. As a result “Ping Pong” mode produces the greatest number of trades.
Step 15. Take a look at the chart. Trades should be showing along the markers plotted earlier.
Step 16. Make adjustments to the Vertex fields in Section 2 until the TradingView performance report is showing a profit. This includes the “Minimum Base To Base” fields. If a profit cannot be achieved move on to Step 17.
Step 17. Improve the backtest profitability by adjusting the “Entry Net Change” and “Entry ROC” in Section 4 and 5. 
Step 18. Enable the “Mandatory Snap” checkbox in Section 4 and 5 and adjust the “Snap Candle Delta” and “Snap Fractal Delta” in Section 2. This should reduce some chop producing unprofitable reversals.
Step 19. Increase the distance between opposing trades by adding an “Interleave Delta” in Sections 4 and 5. This is a floating point value which starts at 0.01 and typically does not exceed 2.0.
Step 20. Increase the distance between opposing trades even further by adding a “Decay Minimum Span” in Sections 4 and 5. This is an absolute value specified in the symbol’s quote currency (right side scale of the chart). This value is similar to the minimum profit and stop loss fields in Section 1.
Step 21. The “Buy Composite Strength” input works in tandem with “Long Decay Minimum Span” in Section 4. Try enabling and see if it improves the performance. This field is only relevant when there is a value in “Long Decay Minimum Span”.
Step 22. The “Sell Composite Weakness” input works in tandem with “Short Decay Minimum Span” in Section 5. Try enabling and see if it improves the performance. This field is only relevant when there is a value in “Short Decay Minimum Span”.
Step 23. Improve the backtest profitability by adjusting the “Adherence Delta” in Section 4 and 5. This field requires the “Adhere to Rising Trend” checkbox  to be enabled.
Step 24. At this point your strategy should be more or less working. Experiment with the remaining check boxes in Section 4 and 5. Keep the ones which seem to improve the performance.
Step 25. Examine the chart and see that trades are being placed in accordance with your desired trading goals. This is an important step. If your desired model requires multiple trades per day then you should be seeing hundreds of trades on the chart. Alternatively, you may be looking to trade fewer steep peaks and deep valleys in which case you should see trades at major turning points. Don’t simply settle for what the backtest serves you. Work your configuration until the system aligns with your desired model. Try changing indicators and even intervals if you cannot reach your simulation goals. Generally speaking, the histogram and Candle indicators produce the most trades. The Fractal indicator captures the tallest peaks and valleys. The Transform indicator is the most reliable but doesn’t well work on all instruments.
 Example Settings 
To reproduce the performance shown on the chart please use the following configuration:
1.  Select XBTUSD Kraken as the chart symbol.
2.  On the properties tab set the Order Size to: 0.01 Bitcoin
3.  On the properties tab set the Pyramiding to: 10
4.  In Section 1: Select “Forex” for the Instrument Type
5.  In Section 1: Select “Ping Pong” for the Trading Mode
6.  In Section 1: Input 1200 for the Minimum Profit
7.  In Section 1: Input 15000 for the Stop Offset
8.  In Section 1: Input 1200 for the Pyramid Minimum Span
9.  In Section 1: Check mark the Ultra Wide Pyramids
10. In Section 2: Check mark the Use Transform Indicator
So to be clear, I used a base position size of one - one hundredth of a Bitcoin and allow the script to add up to 10 downward pyramids. The example back-test did hit eight downward pyramids. That means the account would have to be able to withstand a base position size (0.01) times 28. The resulting position size is 0.28 of a Bitcoin. If the price of Bitcoin is 35K then the draw down amount (not including broker fees) would be $9800 dollars. Since I have a premium subscription my backtest chart includes 20K historical bars. That's roughly six months of data. As of today, pro accounts only get 10K bars so the performance cannot be exactly matched with such a difference in historical data. Please keep that in mind.
There are, of course, various ways to reduce the risk incurred from accumulating pyramids. You can increase the “Pyramid Minimum Span” input found in Section 2 which increases the space between each pyramid trade. Also you can set a “Pyramid Bale Out Offset” in the same input section. This lets you out of the trade faster on position recovery. For example: Set a value of 8000 into this input and the number of trades increase to 178 from 157. Since the positions didn’t go full term, more trades were created at less profit each. The total brute force approach would be to simply limit the number of pyramids in the Properties tab.
It should be noted that since this is crypto, accumulating on the long side may be what you want. If you are not trading on margin and thus outright buying coins on the Kraken exchange you likely are interested in increasing your Bitcoin position at depressed prices. This is a popular feature on some of the other crypto trading packages like CryptoHopper and Profit Trailer. Click on Enable TV Long Only Rule in Section 1. This switches the signal emitter to long only. However, you may still see short trades on the chart. They are treated as a close instead of a reversal.
Feel free to PM me with any questions related to this script. Thank you and happy trading!
 CFTC RULE 4.41 
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
supertrend with 2tp by AkHi traders
This strategy is based on two take profit targets and scaling out strategy. The entry rule is very simple. Whenever supertrend show  long trade is taken and vice versa...and you have to use minimum 2 contract size
Take Profit and Stop Loss
The first take profit is set at 3 points above the long entry and the second take profit is set at 6 points above the long entry. Meanwhile, the stop loss is set at 3 points below the long entry....u can change points for profit and loss
Money Management
When the first take profit is achieved, half of the position is closed. The rest of the position is open to achieve either second take profit or stop loss.
There are three outcomes when using this strategy. Let's say you enter the trade with 200 lot size and you are risking 2% of your equity.
1. The first outcome is when the price hits stop loss, you lose the entire 2%.
2. The second outcome is when the price hits the first take profit and you close half of your position. Meaning that you have gained 1%. Then you let the trade running and eventually it hits stop loss. The total loss is 0% because the remaining lot size which is 200/2=100 times by 20pips is 1%. You have gained the earlier 1% and then loss 1%. At this point, you are at break even.
3. The third outcome is similar to the second out but instead of hiring stop loss, the trade is running to your favor and hits the second take profit.
Therefore, you gained 1% from the first take profit and you gained another 2% for the second take profit. Your total gained is 3%
*FIBAUS BUY and SELL Trender V2 with AlertsFIBAUS BUY and SELL Trender v2 with ALERTS: Hit me up if you want access.
Always be on the right side of the trade and know where to place the stop loss.
Its a very consistent system allowing for a low risk, high gain trading stratergy. Simply wait for the signal to show as BUY or SELL (LONG or SHORT) and place the order. 
SET YOUR ALERTS and WAIT!
Tight stops losses are placed above (Sell/shorts) and below (Buy/Long) orders.
Horizonatal plot lines are to be used as Targets and reversal zones. Green lines are support zones and red lines act as resistance zones.
The Lagging line is the 200 EMA which give me a view of the overall trend of the market and indicates if I should only take Buy or Sell orders. When the 200 is RED, I only sell/short. When it is GREEN, I only Buy/Long.
NB: In trading support and resistance zones interchange. This means that supports can become resistance and resistance can become support zones.
For BTC/XBT, I use 2 hour candles.
Forex, I use 1 hour and 3 hour candles.
For Options I use the 1 hour candles.
Stop Loss stays the same for all types (which is above or below the candle signaling buy or sell.
Hit me up if you want access.
Happy Trading !!
FIBAUS
*FIBAUS BUY and SELL TrenderFIBAUS BUY and SELL Trender: Always be on the right side of the trade and know where to place the stop loss. 
Its a very consistent system allowing for a low risk, high gain trading stratergy. Simply wait for the signal to show as BUY or SELL (LONG or SHORT) and place the order. 
Tight stops losses are placed above (Sell/shorts) and below (Buy/Long) orders. 
Horizonatal plot lines are to be used as Targets and reversal zones. Green lines are support zones and red lines act as resistance zones. 
The Lagging line is the 200 EMA which give me a view of the overall trend of the market and indicates if I should only take Buy or Sell orders. When the 200 is RED, I only sell/short. When it is GREEN, I only Buy/Long. 
NB: In trading support and resistance zones interchange. This means that supports can become resistance and resistance can become support zones. 
For BTC/XBT, I use 2 hour candles. 
Forex, I use 1 hour and 3 hour candles.
For Options I use the 1 hour candles.
Stop Loss stays the same for all types (which is above or below the candle signaling buy or sell. 
Hit me up if you want access. 
Happy Trading !!
FIBAUS
Trailing % StopTrailing % Stop is a simple Stop Loss indicator which users have to define a % percent rate to trail the price like MOVING STOP LOSS "MOST" Indicator.
The main difference is MOST refers to exponential moving averages although Trail % Stop refers to source price.
Default price of source is CLOSE price which can be optimized by the user.
 "What is a Trailing Stop-Loss?
A trailing stop-loss order is a special type of trade order where the stop-loss price is not set at a single, absolute dollar amount, but instead is set at a certain percentage or a certain dollar amount below the market price.  A trailing stop-loss is sometime referred to simply as a trailing stop.
How a Trailing Stop-Loss Works
When the price goes up, it drags the trailing stop-loss along with it, but when the price stops going up, the stop-loss price remains at the level it was dragged to.
A trailing stop-loss is a way to automatically protect yourself from an investment's downside while locking in the upside.
For example, you buy Company XYZ for $10. You decide that you don't want to lose more than 5% on your investment, but you want to be able to take advantage of any price increases. You also don't want to have to constantly monitor your trades to lock in gains.
You set a trailing stop on XYZ that orders your broker to automatically sell if the price dips more than 5% below the market price.
The benefits of the trailing stop are two-fold. First, if the stock moves against you, the trailing stop will trigger when XYZ hits $9.50, protecting you from futher downside.
But if the stock goes up to $20, the trigger price for the trailing stop comes up along with it. At a price of $20, the trailing stop will only trigger a sale if the stock drops below $19. This helps you lock in most of the gains from the stock's rally.
In the example, you could also decide you don't want to lose more than $2 on your $10 investment. If the stock goes up to $20, the trailing stop-loss would drag along behind the price and only trigger a sale if the stock falls to $18.
Why a Trailing Stop-Loss Matters
A trailing stop-loss can be good for investors who may not have enough discipline to lock-in gains or cut losses. It removes some of the emotion from the trading process and offers some capital protection automatically.
There are some drawbacks to consider. First, you need to consider your trailing stop percentage or amount very carefully. If you're investing in a particularly volatile stock, you could find the stop level triggered fairly frequently."
 
Long Short signals and alarms are also included.
™TradeChartist Entry/Exit Indicator™TradeChartist Entry/Exit Indicator  is an easy to use indicator that plots very high probability BUY and SELL signals on the chart along with an optional dynamic trigger line for SELL and BUY which can be used as a reference for Stop Loss/ Trailing Stop Loss. 
 What does the ™TradeChartist Entry/Exit Indicator do? 
 
  Plots very high probability BUY and SELL signals on chart 
  Plots dynamic BUY or SELL trigger lines that can be used to
---------1. Set Stop Loss reference or Trailing Stop Loss.
---------2. Anticipate change in trend/momentum when price breaches the trigger line.
  Plots BUY and SELL price lines which are Candle open prices when BUY/SELL signals are posted.
  Alert traders when BUY/SELL signal is generated and Trigger for BUY/SELL is breached. 
  Plots Background vertical Signal break lines at BUYs in green and at SELLs in red.
  Plots % Gains based on candle close in real-time and based on candle high for BUY/candle low for SELL on previous candles calculated from the candle open price at BUY/SELL.
  Plots RSI colour candles based on user preferred Overbought and Oversold RSI levels from indicator settings.
  Paints background colour for BUY and SELL zones which can be changed from indicator settings under Style tab to personalise the chart screen.  
 What markets can this indicator be used on? 
 
 Forex 
 Stocks 
 Commodities 
 Cryptocurrencies 
 and almost any asset on Trading View 
Works really well when there is good volume, volatility or both in the asset observed/traded.
 Does this indicator repaint? 
No and Yes
 
  Once the confirmed BUY (in green) and SELL (in red) signals are posted after a candle close, it doesn't repaint. 
  Repainting happens for real time BUY and SELL trigger plots on the current candle as price tries to breach the trigger line. 
For confirmed BUY and SELL alerts, use alerts on candle close. Real-time BUY and SELL trigger alerts can also be set.
 Does the indicator send alerts when a signal is generated? 
Yes, traders can get alerts by setting Trading View alerts for BUY/SELL Signals and BUY/SELL Triggers. For confirmed BUY/SELL alerts, 'Once per bar close' must be used.
 Why are there two Signal Generator types in the indicator settings? 
The two types of signal generators cater to almost all types of traders and trade types. Some assets perform well with Type 1 and some assets with Type 2. Also some traders prefer Type 1 and some prefer Type 2 based on variation in frequency of signals on the asset observed. Both types can be used along with 'Use Heikin Ashi Candles' from the indicator settings to have more combinations to test on an asset for maximising gains.
Type 1 on GBPUSD 1hr chart
  
Type 2 on GBPUSD  1hr chart
  
Type 1 normally works well with most types of assets.
 Should the indicator be used on normal candles or Heikin Ashi candles? 
The indicator can be used on either of the candle types. If signals from Heikin Ashi chart needs to be plotted on normal chart, just check 'Use Heikin Ashi Candles' from indicator settings. It may not be exact, but very close as it mimics Heikin Ashi chart trend. 
Heikin Ashi charts are recommended to spot trends and reversals but they don't reflect real OHLC values in the candles, so BUY/SELL entry price points may not be ideal using Heikin Ashi charts especially when there are gaps in price action (example Stocks, FOREX, Commodities). For real OHLC prices and to know exact price points for entering/exiting trade, use normal candlestick charts. It is purely for this reason Heikin Ashi chart signals can be mimicked on normal candles using 'Use Heikin Ashi Candles' option from settings without having to switch between the two.
  
It can be seen from the GOLD 1hr charts above (Heikin Ashi on left and normal candlestick chart on right), the indicator mimics signals sensibly (not copy) and doesn't use same entry values as Heikin Ashi chart to aid the trader with practical trade execution.
 How do the Trigger Lines work and should they be used? 
Trigger for BUY/SELL lines are coded to adapt to bull and bear power in the asset trading environment and helps the trader to anticipate change in trend based on direction of price momentum when enabled from indicator settings (On by default). Traders can use trigger lines as reference for Stop Loss points. For example, when a BUY signal is posted, the 'Trigger for SELL' can be used as initial Stop Loss reference and as price starts going up, the trigger line starts moving up enabling the trader to use it as a trailing stop loss point which helps secure or lock profits as they act as ideal support/resistance lines based on the type of trade too. BUY/SELL Trigger lines can be enabled or disabled from indicator settings 'Inputs' tab.
Also, the trigger lines can alert traders to anticipate change in trend/momentum when price hits them and it helps them take a position, either Long or Short when confirmed BUY/SELL signal is posted. As price tries to breach the trigger lines, they change from 'Trigger to BUY/SELL' to 'BUY/SELL Triggered' as shown below on 1hr Gold chart. This feature is coded purely to signal the trader a potential change in trend/momentum. The trigger lines also act as strong support/resistance so only a confirmed close above them will ensure a High Probability Trade.
  
It should also be noted that price tends to test the BUY/SELL trigger lines to see if a breach is possible. A rejection at trigger lines could mean trend continuation in the signal direction. Traders could use other trend indicators like Ichimoku cloud, stoch, TRIX etc. to make an informed trade decision here. In the chart below, the 'BUY triggered' label has changed back to 'Trigger for BUY' as price failed to close above it.
  
 What is the use of 'Plot BUY/SELL Price Line'? 
Enabling BUY/SELL price line from settings (On by default) plots the price line corresponding to candle open when BUY/SELL signals were posted on the chart by the indicator. Open price is used as it is close to the trigger lines and is a fair reference point for indicator to calculate the gains plot on chart since BUY/SELL signals.
 Can trade gains be plotted on chart and how are they calculated? 
To show percentage gains on chart, just enable 'Show % Gains on Chart' from indicator settings (Off by default). As explained above, % gains are calculated from BUY/SELL candle Open price to high (for Long trades) or low (for Short trades) and to current candle close (for both Long and Short trades) as it helps see real-time gains from BUY/SELL candle Open price. The % gains are plotted as below.
0 - 0.75%    -  ↑       in green
0.75-1.5%   -  1%    in green
1.51-2.5%   -  2%    in green
2.51-3.5%   -  3%    in green
3.51-4.5%   -  4%    in green
4.51-5.5%   -  5%    in green
5.51-10.5% -  5+%  in green
10.51-20%  -  10+% in green
20+%          -  20+% in green
Down from Entry - ↓ in red
 What are RSI Colour Candles? 
RSI Colour Candles are visual candle plots in colour (Blue when RSI>60, Yellow when RSI<30 and On by default) that help trades spot RSI levels at a glance visually from the chart in real-time without the need for another indicator on screen. Traders can also choose the source to be used for plotting RSI colour candles from indicator settings input tab and change candle colours from indicator settings style tab. The length for RSI calculation is 14 and works well for almost any trading scenario and cannot be changed from indicator settings. The default overbought RSI is set at 60 as it helps spot momentum increase and big moves happen above 60 RSI. When deciding to sell or buy, RSI can be tuned from settings to spot decent entry or exit. For example, RSI>80 on a red Heikin Ashi candle (blue body and red border) after an uptrend could signal potential sell-off or RSI<30 on a green Heikin Ashi candle (yellow body and green border) after a down trend could signal a good move up. In the example daily chart of RVN-BTC below, RSI>75 on a red Heikin Ashi candle signalled a potential sell off way before the actual SELL signal plot on chart.
  
 What is the use of Signal Break Line Plot and Paint Background options from indicator settings? 
Signal break lines can be useful if traders prefer to switch off BUY/SELL signals from indicator settings to show where previous signals were generated. (On by default)
Paint Background is just a nice to have feature that paints the signal zones to personalise the chart screen. (Off by default). The background paint colours can be changed from indicator settings style tab.
4hr SPX chart below showcases the difference when the Signal Break Lines and Background Paint options are used with BUY/SELL signals switched off.
  
 Important Note: 
When using this indicator on a chart, check 'Scale Price Chart Only' and 'Auto (Fits Data to Screen)' by clicking on settings wheel on the bottom right under the chart screen as shown below. If not checked, the chart screen will look like one on the left as shown below.
  
-----------------------------------------------------------------------------------------
 This is not a free to use indicator. Get in touch with me if you would like access to the indicator for a 1 day trial before deciding on a paid access for a period of your choice. Monthly, Quarterly, Half-Yearly and 1 Year access available. 
-----------------------------------------------------------------------------------------
Momentum Trader Strategy  3.0Momentum Trader 3.0 is a momentum trading strategy which uses volume to confirm market momentum driven moves.
 
  By default it only trades between 0900 and 1530 (designed for futures trading and can be toggled to 24/7)
  No repaint issues, what you see is real
  Toggles allow you to enable Long or Short independently which may work better or worse for your market
  Designed primarily for Day Trading (1-15m interval)
  Presently only the Short side is optimized, the Long works but overtrades a bit. I will be adding an option to remove the less useful signals and improve performance.
 
Momentum Trader is a real and successful momentum strategy (which I use myself). It isn't a miracle 'always win' strategy but it is a steady workhorse. By combining high probability momentum trades and auto stop-losses, it takes a good slice of most rallies, a big slice of the grand drops, and avoids heavy sudden losses. 
Momentum Trader can be used in any timeframe. Your success depends on the volatility of the individual market. I recommend trading at 10m and below for high volatility instruments like ES/SPX while low volatility instruments can be traded at the 1h and beyond. At the level of 1D+ it also works as well but naturally as a momentum strategy it may take a while to pivot. 
Momentum Trader provides you with 3 long and 2 short entries which represent different levels of risk/reward. Like any real strategy, there can be periods of chop where the strategy will lose (small based on stop-loss) if the market is chopping very quickly back and forth or pivoting suddenly. As a rule, Momentum Trader attempts to avoid most of that by typically flagging trends which are established and confirmed. Different signals give you different degrees of confirmation and thus different risk/reward. 
Default Strategy Inputs (Forex / Crypto)The code in this post contains a set of default strategy inputs I use in new projects / backtests in Tradingview.
Full code commentary is available on the Backtest-Rookies website. To comply with house rules, I cannot post the direct link here. 
 Features 
 
   Trade Direction:  So that you can limit the strategy for long only, short only or trade in both directions. It is important to note that when you select “Long Only”, you will still see Short signals on the chart. However, they are only used to close a position rather than reverse it. This is the default behaviour for strategies. The same applies to “Short Only”.
   Date Ranges:  So that you can isolate backtesting to specific periods of interest such as bull or bear markets.
   Sessions:  So you can easily get an idea of the expected results during your own session. You may also notice that performance of the strategy varies depending on which session it is deployed in.
   Some example stop losses:  It is not an exhaustive list but it should be enough to provide some inspiration for different types of stops that you can experiment with.
 
Happy Scripting. I hope the community finds it useful. 
RSI & VWAP StrategyRSI & VWAP 'Buy the Dip' Strategy with Advanced Trailing Stop
Strategy Overview
This is a long-only, mean-reversion "buy the dip" strategy designed to identify and capitalize on oversold conditions in the market. The core philosophy is to enter positions when an asset is technically oversold (confirmed by RSI) and trading at a "discount" relative to its recent volume (confirmed by VWAP).
The strategy does not just look for weakness; it waits for a single bar of bullish confirmation (a green candle) before triggering an entry. This helps to filter out "falling knives" and improves the quality of the entry signal.
The true power of this script lies in its sophisticated position management, which includes:
Smart Pyramiding: A "scale-in" feature that allows you to add to your position at cheaper prices.
Dual-Mode Exit System: You can choose between a simple, fixed Stop-Loss/Take-Profit or an advanced, multi-stage trailing stop designed to protect profits and let winners run.
1. The Entry Signal: "The Dip"
A buy signal (marked by a green triangle below the bar) is generated only when all three of the following conditions are met simultaneously:
RSI is Oversold: The RSI value drops below the user-defined RSI Oversold Level (default: 30). This identifies technically oversold weakness.
Price is Below VWAP: The closing price is below the Volume-Weighted Average Price. This indicates the price is "cheap" relative to where the majority of volume has traded.
Bullish Confirmation Bar: The bar itself must be green (close > open). This acts as a confirmation signal, showing that buyers are stepping in to defend the oversold/undervalued level.
2. Position Management: Smart Pyramiding
This strategy allows for pyramiding (default: 1 additional entry). However, it doesn't just buy every new signal. It uses a "Smart Pyramiding" feature controlled by the "Percent Decrease" input.
How it works: When a new buy signal appears after you are already in a position, the strategy checks the Percent Decrease value.
Example (Percent Decrease = 5%): The strategy will only add to your position if the new entry price is at least 5% lower than your last entry price. This is an "average down" or "scale-in" feature that ensures you only add to your position at significantly better prices.
If set to 0%: The strategy will add to the position on any new valid buy signal (up to the pyramid limit).
3. The Dual-Mode Exit System
This is the most advanced feature of the script. You can choose your exit logic using the "Enable Trailing Stop" checkbox.
Mode 1: Standard SL/TP (Trailing Stop = OFF)
This is the simple, traditional exit mode.
It uses a fixed percentage-based Stop Loss and Take Profit.
These are calculated from the strategy.position_avg_price (your average entry cost).
Ideal for straightforward backtesting or a "set it and forget it" approach.
Mode 2: Advanced Trailing Stop (Trailing Stop = ON)
This is a dynamic, multi-phase exit logic designed to maximize gains and protect profits. It works in three distinct phases:
Phase 1: Entry (No Stop-Loss)
CRITICAL: When a position is first opened in this mode, no stop-loss is active. This is a deliberate design choice to avoid being stopped out by initial volatility before the trade has a chance to move in your favor. The position is "naked" until it hits the first profit target.
Phase 2: Activation (Breakeven Trigger)
When the price's high reaches your "First Profit Target (%)" (default: 5%), the trailing stop activates.
The script now begins tracking the highestPrice achieved since activation.
Phase 3: Trailing & Profit Protection
Once activated, the script places a dynamic stop-loss at a distance of "Trailing Pullback Stop (%)" (default: 3%) below the highestPrice.
Profit Lock-In: This stop-loss can only move up. It includes a breakeven-plus feature (math.max(trailingStopLevel, entryPrice)). This means that once your stop is activated, it will never move back below your average entry price, effectively guaranteeing that a winning trade cannot turn into a loss.
Example: Your First Profit Target is 5% and Trailing Pullback is 3%. The trade goes to +5% (trail activates, breakeven stop is placed). It then goes to +10% (stop moves up to +7%). If the price then falls to +6.9%, you are stopped out with a +7% gain.
Pyramid-Reset Logic: If you pyramid into a position (add a second entry), the entire Trailing Stop mechanism resets. The strategy.position_avg_price is recalculated, and the logic returns to Phase 1 (No Stop-Loss) until the new First Profit Target is hit based on the new average cost.
Key Inputs & Features
RSI Settings: RSI Period and RSI Oversold Level to fine-tune the entry signal.
ADVANCE SETTINGS:
Use Percentage Decrease?: Enables the "Smart Pyramiding" feature.
Percent Decrease: The percentage discount required for a pyramid entry.
TRAILING STOP (Group):
Enable Trailing Stop: The master switch for the exit logic (Mode 1 vs. Mode 2).
First Profit Target (%): The percentage gain required to activate the trailing stop.
Trailing Pullback Stop (%): How "tight" the trailing stop will be once active.
Standard SL/TP (Group):
Stop Loss %: Used only if the Trailing Stop is OFF.
Take Profit %: Used only if the Trailing Stop is OFF.
Backtesting Date Range: Built-in date filters allow you to easily test the strategy's performance during specific market periods (e.g., bull markets, bear markets, or choppy ranges).
How to Use & Recommendations
Test Both Exit Modes: Run backtests using both the Standard SL/TP mode and the Advanced Trailing Stop mode to see which performs better on your asset and timeframe.
Understand the Risk: Be fully aware that in Advanced Trailing Mode, there is no hard stop-loss between your entry and the "First Profit Target." This requires a higher risk tolerance but can prevent premature stop-outs.
Tune for Your Asset: This is a mean-reversion strategy. It may perform best in markets that are ranging or "choppy." It may perform poorly in very strong, one-directional trending markets. Adjust the RSI and Percent Decrease settings to match the volatility of your chosen asset.
Disclaimer: This script is for educational and informational purposes only. It is not financial advice. All trading involves risk, and past performance is not indicative of future results. Please conduct your own thorough backtesting and research before using this strategy with real funds.






















